<!--
Date: 2025-08-13
Copyright (c) 2025 CAX Conversion Project
-->
<template>
  <div class="elements">
    <Elements v-if="showElementsList" @handleEvent="handleEvent" />
    <UploadElements v-if="showUploadElements" @handleEvent="handleEvent" />
  </div>
</template>
  <script setup name="Elements">
import Elements from './component/Elements.vue';
import UploadElements from './component/UploadElements.vue';
const showElementsList = ref(true);
const showUploadElements = ref(false);
const handleEvent = (data) => {
  if (data.component === 'Elements') {
    if (data.type === 'import') {
      showElementsList.value = false;
      showUploadElements.value = true;
    }
  }
  if (data.component === 'UploadElements') {
    showUploadElements.value = false;
    if (data.type === 'finish') {
      // 执行查询
    }
    showElementsList.value = true;
  }
};
</script>
  <style lang="scss" scoped>
.elements {
  height: calc(100vh - 84px);
  width: 100%;
}
</style>